package es.ats.codington.festival.mappers;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import es.ats.codington.festival.domain.Place;

/**
 * 
 * @author Codington_RED
 */

public class PlaceMapper implements RowMapper<Place>{

	/**
	 * @param resultSet
	 * @param numRow
	 * @return place
	 * @throws SQLException
	 */
	@Override
	public Place mapRow(ResultSet resultSet, int numRow) throws SQLException {
		Place place = new Place();
		
		 place.setId(resultSet.getInt("idPlace"));
		 place.setNamePlace(resultSet.getString("namePlace"));
		 place.setCapacityPlace(resultSet.getInt("capacityPlace"));
		 place.setPlaceDescription(resultSet.getString("placeDescription"));
		 place.setZonePlace(resultSet.getString("zonePlace"));
		 place.setImagePlace(resultSet.getString("imagePlace"));
		 
		 return place;
	}

}
